package com.googlecode.lightest.core

class LightestTaskTest extends GroovyTestCase {
    def task
    
    @Override
    void setUp() {
        task = [ doPerform: { r -> } ] as LightestTask
    }
    
    void testGetParamsSortsByParameterName() {
        def map = new TreeMap()
        def attributes = [:]
        
        for (letter in 'z'..'a') {
            map[letter] = letter
            attributes[letter] = letter
        }
        
        task.config = new TaskNode(null, 'n1', attributes, 'v1')
        
        assertEquals("${map.toString()}, v1", task.getParams())
    }
}